<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="__PUBLIC__/Js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Js/ghulam.js"></script>
</head>
<body >
<div class="container-fluid" >
    <div class="row">
        <?php if(($cat_name=='') AND ($obg=='')): ?><h3 class="sub-header">全部内容</h3>
            <?php elseif($obg!=''): ?><h3 class="sub-header">你搜搜的原内容：<?php echo ($obg); ?></h3>
            <?php else: ?><h3 class="sub-header"><?php echo ($cat_name); ?>列表</h3><?php endif; ?>
        <div class="col-sm-9  " style="width: 100%">
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <td colspan="7">
                            <form action="<?php echo U(GROUP_NAME.'/Content/index',array('cat_name'=>$cat_name));?>" method="post" >
                                <div class="control-group">
                                    <div class="controls">
                                        <div class="input-append">
                                                <?php if(($cat_name=='')OR($cat_name==null) ): else: ?><a href="<?php echo U(GROUP_NAME.'/Content/addcontent',array('cat_name'=>$cat_en_name));?>" class="btn btn-primary">添加<?php echo ($cat_name); ?> </a><?php endif; ?>
                                            <input style="height: 33px;width: 200px;" class="span2 text" placeholder="输入会员姓名" type="text" name="search_obg"/>
                                            <input type="submit" class="btn btn-success" value="搜搜"/>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </td>
                    </tr>
                    <tr>
                        <th>内容标题</th>
                        <th>所属栏目</th>
                        <th>内容封面</th>
                        <th>发布时间</th>
                        <th>发布人</th>
                        <th>是否内部</th>
                        <!--<th>访问</th>-->
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if(is_array($con)): foreach($con as $key=>$v): ?><tr>
                            <td><?php echo ($v["con_title"]); ?></td>
                            <td><?php echo ($v["name"]); ?></td>
                            <td style="width: 10%;">
                                <?php if($v['con_pic']!=''): ?><img width="130px" height="35px" src="__UPLOAD_PIC__<?php echo ($v["con_pic"]); ?>"/>
                                <?php else: ?>-------<?php endif; ?>
                            </td>

                            <td><?php echo ($v["add_time"]); ?></td>
                            <td><?php echo ($v["adder_name"]); ?></td>
                            <td><?php if($v['security']==1): ?>内部<?php else: ?>公开<?php endif; ?></td>
                            <!--<td><a href="<?php echo U('Index/Content/show',array('id' => $v['id']));?>"><span class="label label-primary">访问</span></a></td>-->
                            <td>
                                <?php if($v['accept']): ?><span class="label label-primary">已审核</span>
                                        <?php else: ?>
                                    <span class="label label-danger">待审核</span>
                                    <a href="<?php echo U(GROUP_NAME.'/Content/on_status', array('rid' => $v['id'],'category'=>$cat_en_name));?>" class="btn button-primary btn-xs">审核</a><?php endif; ?>
                            </td>
                            <td>
                                <span class="btn-group">
                                    <a  href="<?php echo U(GROUP_NAME.'/Content/edit', array('id' => $v['id']));?>" class="btn button-royal btn-xs">编辑</a>
                                </span>
                                <span class="btn-group">
                                    <a onclick="return del();" href="<?php echo U(GROUP_NAME.'/Content/delete', array('id' => $v['id']));?>" class="btn btn-danger btn-xs">删除</a>
                                </span>
                            </td>
                        </tr><?php endforeach; endif; ?>
                    </tbody>
                    <tr>
                        <td align="center" colspan="9"><?php echo ($page); ?></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
<div><?php echo ($v["a"]); ?> <?php echo ($a["id"]); ?></div>

<link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/bootstrap/css/button.css" rel="stylesheet">
<script src="__PUBLIC__/bootstrap/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/bootstrap/js/bootstrap.js"></script>
</body>
</html>